package dfl.bysj.entity;

import java.time.LocalDateTime;
import java.io.Serializable;
import java.util.Objects;

import com.baomidou.mybatisplus.annotation.FieldFill;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 
 * </p>
 *
 * @author DFL
 * @since 2022-04-26
 */
@Data
@EqualsAndHashCode(callSuper = false)
@ApiModel(value="Teacher对象", description="")
public class Teacher implements Serializable {

    private static final long serialVersionUID = 1L;

    public Teacher(String teaName, Integer teaPhone) {
        this.teaName = teaName;
        this.teaPhone = teaPhone;
    }

    @TableId(type = IdType.AUTO)
     private Integer teaId;

    private String teaName;

    private Integer teaPhone;
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime createTime;
    @TableField(fill = FieldFill.INSERT_UPDATE)
    private LocalDateTime updateTime;

    public Teacher() {

    }


    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Teacher teacher = (Teacher) o;
        return Objects.equals(teaId, teacher.teaId) && Objects.equals(teaName, teacher.teaName) && Objects.equals(teaPhone, teacher.teaPhone);
    }

    @Override
    public int hashCode() {
        return Objects.hash(teaId, teaName, teaPhone);
    }
}
